using System;

using CUtil;
namespace CStock
{
	public interface ITradeStep
	{
       
        IDataItem DataItem_SelectedForPortfolio { get;set;}

        //private double maxMoneyForBuyPerShare;
        bool Init(bool resetIndicators, CUtil.TradeMoneyType tradeType, double shareQuoteInitial);
        
        ITrader Trader { get;set;}
		System.Collections.ArrayList PrognosisAll{get;set;}
		int TradeSystemIndex{get;set;}
		double Prognosis{get;set;}
		int DataClassIndex{get;}
	
		double CalculatePerformance();
        
		string IndicatorsString {get;set;}
        int DataItemSelected_Index_ForPortfolio { get;}

		double ValueTotal{get;}
		double PerformanceBuyAndHold_Share{get;}
        double Performance { get;}
		double PerformancePerYear{get;}
		//double Performance{get;}
		double PerformanceRelative{get;}
		double PerformanceRelativePerYear{get;}
        double PerformanceBuyAndHold_Share_PerYear { get;}
		double PerformanceIntraday{get;}
		

		
		string NameItem {get;}


		double Money {get;set;}
	
		double MoneyStart {get;set;}
		double MaxMoneyForBuyPerShare {get;set;}
		double MaxMoneyForBuyPerPortfolio {get;set;}
        double LastBuyTransaction { get; set; }

        double WinLoss { get; set; }
		int DateIndex {get;set;}
		int DateMinIndex {get;set;}
		int DateMaxIndex {get;set;}
		DateTime DateMin {get;set;}
		DateTime DateMax {get;set;}
		DateTime Date {get;set;}

       
		// bool IndicatorsEvaluated{get;set;}
		TradeType TradeType{get;set;}
		TradeType TradeTypeMoneyPossible{get;set;}

		System.Collections.ArrayList TradeEvents{get;set;}

		TradeWriteModes TradeWriteMode{get;set;}
		IIndicators IndicatorsSell{get;set;}
		
		IIndicators IndicatorsBuy{get;set;}
		bool BuySellOccurs{get;set;}
		bool Intraday{get;set;}


		double QuoteShare{get;}
		double QuoteShareLastTrade{get;set;}

		double QuoteShareMaxSinceLastTrade{get;set;}

		double QuoteShareMinSinceLastTrade{get;set;}



		int NumberOfSharesTraded{get;set;}
		double TransactionCosts{get;set;}
		double BankingCosts{get;set;}
        double BankingCostsPercentage { get; set; }
		double TotalBankingCosts{get;set;}
		int NumberOfShares{get;set;}
	
		
		bool ShareDataAvailableForCurrentDate(DateTime myDate);


		
		NameObjectCollection PerformancePerYearCollection{get;}
		NameObjectCollection PerformanceRelativePerYearCollection{get;}
		NameObjectCollection PerformanceBuyAndHoldPerYearCollection{get;}
		double PerformanceOfLastTrade{get;}
		

		


		double IndicatorValue{get;set;}
		void Reset( bool resetIndicators, CUtil.TradeMoneyType tradeType, double shareQuoteInitial);

		double FuturesMoneyPerTick{get;set;}
		double FuturesContractValue{get;set;}
		double FuturesBankCost{get;set;}

		bool FuturesTrade{get;set;}
		double MinimalTransactionCost{get;set;}
		double MaximalTransactionCost{get;set;}

		double ConstSingleTransactionPercentageCost{get;set;}
		

		double MinmalTransactionAmount{get;set;}

		int TradesSuccesfull{get;}
		int TradesNumber{get;}
		
		double TradeStopLossDynamicLimit{get;set;}
		double QuoteLastDay{get;}


        bool TradeSimulationInitiaded { get;set;}

        bool ResetDatesFromQuotes(bool resetIndicators, IDataProvider dc, CUtil.TradeMoneyType tradeType);

        ITradeSystem TradeSystem { get;set;}
        ITradeSystem TradeSystemForShortSell { get;set;}
       
        void CreateListPerYearCollection();

	}
}
